home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / xcmd / dxcmds34.sit / Dartmouth XCMD's 3.4.3 / card_4967.txt < prev    next >
Text File  |  1990-04-17  |  19KB  |  532 lines

  1. -- card: 4967 from stack: in.3
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3241
  5. -- name: PictureShow
  6. ----- HyperTalk script -----
  7. on Install
  8.   put ChooseTargetStack() into stackName
  9.   InstallResource XCMD,PictureShow,stackName
  10.   InstallResource XCMD,PictureHide,stackName
  11. end Install
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: A003
  17. -- rect: left=65 top=300 right=322 bottom=200
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: PictureShow
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   global butterflies
  29.   if butterflies is "TRUE" then
  30.     PictureHide "Butterfly"
  31.     put FALSE into butterflies
  32.     set the name of me to "PictureShow"
  33.   else
  34.     PictureShow "Butterfly",50,54,0,stay
  35.     get the result
  36.     if "Error" is not in it then
  37.       put TRUE into butterflies
  38.       set the name of me to "PictureHide"
  39.     end if
  40.   end if
  41. end mouseUp
  42.  
  43.  
  44.  
  45. -- part 5 (field)
  46. -- low flags: 81
  47. -- high flags: 2007
  48. -- rect: left=12 top=26 right=298 bottom=491
  49. -- title width / last selected line: 0
  50. -- icon id / first selected line: 0 / 0
  51. -- text alignment: 0
  52. -- font id: 22
  53. -- text size: 10
  54. -- style flags: 0
  55. -- line height: 13
  56. -- part name: Source
  57.  
  58.  
  59. -- part 7 (button)
  60. -- low flags: 00
  61. -- high flags: A003
  62. -- rect: left=299 top=300 right=322 bottom=438
  63. -- title width / last selected line: 0
  64. -- icon id / first selected line: 0 / 0
  65. -- text alignment: 1
  66. -- font id: 0
  67. -- text size: 12
  68. -- style flags: 0
  69. -- line height: 16
  70. -- part name: Show Pascal Source
  71. ----- HyperTalk script -----
  72. on mouseUp
  73.   set the visible of card field 1 to not the visible of card field 1
  74.   if the visible of card field 1 is true then
  75.     set the name of me to "Hide Pascal Source"
  76.   else set the name of me to "Show Pascal Source"
  77. end mouseUp
  78.  
  79.  
  80.  
  81. -- part contents for background part 16
  82. ----- text -----
  83. PICTURESHOW XCMD version 1.0.1
  84. PICTUREHIDE XCMD version 1.0
  85. Kevin Calhoun
  86.  
  87. NOTE TO USERS OF POPUPPICTURE:  PictureShow is a revision and extension of PopUpPicture and includes all of PopUpPicture's features.  You can use PictureShow in place of PopUpPicture, if you make two changes to your parameters:  change the first parameter you passed to PopUpPicture, the ID of a PICT resource, to the name of that PICT resource, and make sure you pass "onPress" as the fifth parameter if you want the picture to disappear the next time the mouse button is pressed and "onRelease" if you want the picture to disappear the next time the mouse button is released.  With these changes, PictureShow will work exactly as PopUpPicture did.  But if you want to know what the new features are, read on...
  88.  
  89. PictureShow opens a window on top of the current card and displays a picture in it.  The type of window in which the picture is displayed can be any of the standard Macintosh window types.  The window will automatically be sized to fit the entire picture.  You can dispose of the window in two ways:  1) automatically when a mouse event occurs or 2) within a script, as the result of a call to PictureHide.
  90.  
  91. Color pictures (in PICT2 format) will appear in color on a suitably equipped Macintosh and will appear in monochrome on any other machine running System 4.1 or later.  PictureShow extracts color table information from pictures in PICT2 format in order to display them in their proper colors.
  92.  
  93. You tell PictureShow what picture to draw by passing it the name of a resource of type PICT, which can be contained in the current stack or in any other open resource file, including the home stack, HyperCard, or the System file.  Any picture you've copied to the clipboard can become a resource of type PICT--use the ClipToPICT XFCN to achieve this transformation and to install the new PICT resource in your stack.  A file of type PICT can be converted to a PICT resource using the PICTFileToRes XFCN.
  94.  
  95. The name of the PICT resource you pass to PictureShow becomes the title of the window it creates (even when the title is not visible, as in the case of window types that have no title bar).  You tell PictureHide what window to dispose of by passing it the same name you passed to PictureShow.  If there are two or more windows of the same name created by PictureShow on the screen at the same time, PictureHide will dispose of the one closest to the front.
  96.  
  97. INVOKING PICTURESHOW
  98.  
  99. PictureShow   "pictureName",<left>,< top>, <windowKind>, <whenToDispose>,<passThru>
  100.  
  101. PictureShow takes six parameters, only the first of which is required.
  102.  
  103. The pictureName is the name of the PICT resource you want displayed.  You should enclose this name in quotation marks.
  104.  
  105. The left and top parameters become the horizontal and vertical coordinates of the upper left corner of the picture, given as coordinates in the card window's coordinate system.  A left of 0 and a top of 0 would draw the picture flush against the upper left corner of the card window.  If either of these parameters is absent, PictureShow centers the picture on the main screen.
  106.  
  107. PictureShow will draw any of the five standard kinds of windows--a windowKind of 0 produces a regular document window with a title bar (but no go-away box), a windowKind of 1 produces a box with a double border, a windowKind of 2 produces a plain box, a windowKind of 3 produces a plain box with shadow, and a windowKind of 16 produces a window with rounded corners and a black title bar.  If windowKind is any value other than these, the results depend on which WDEF resources are installed.  (If that doesn't make any sense to you, don't worry--nothing bad will happen if you use a far-out value for windowKind.)  If the windowKind parameter is absent, PictureShow defaults to a regular document window with a title bar.
  108.  
  109. If you want the picture to remain present until the next time the user pushes the mouse button, pass "onPress" in the fourth parameter, whenToDispose.  If you want the picture to remain present until the next time the user releases the mouse button, pass "onRelease" as whenToDispose.  If you want the window to remain on the screen until you call PictureHide to get rid of it, pass "stay" as whenToDispose.   If you don't provide this parameter, or if you pass something PictureShow doesn't recognize, PictureShow leaves the window on the screen until PictureHide is called to dispose of it.  (Note:  For compatibility with PopUpPicture, TRUE means the same thing as onRelease.)
  110.  
  111. If you want the event that causes the picture to be removed (a mouseDown if whenToDispose is onMouseUp, a mouseUp if whenToDispose is onMouseUp) to be passed on to HyperCard so that it causes a HyperTalk message to be generated, pass "true" in the passThru parameter.
  112.  
  113. INVOKING PICTUREHIDE
  114.  
  115. PictureHide pictureName
  116.  
  117. The only parameter pictureName takes is the name of the window to be disposed of, which is the same as the name of the PICT that's drawn in the window.  (Note:  PictureHide disposes only of windows that PictureShow created.)
  118.  
  119. EXAMPLES:
  120.  
  121. PictureShow "Butterfly",40,56,3,onPress
  122. PictureShow "Dartmouth Arms",19,34,2,stay
  123.  
  124. PictureHide "Dartmouth Arms"
  125.  
  126. REVISION HISTORY
  127. 1.0 -- May 4, 1989.
  128. 1.0.1 -- June 17, 1989.  Will not display picture unless at least 33K of memory will remain free after the picture is loaded and the window is drawn.  (HyperCard quits if it finds less than 32K of memory free on idle.)
  129.  
  130. -- part contents for card part 5
  131. ----- text -----
  132. UNIT PopUpPicture;
  133.  
  134. { PictureShow XCMD ┬⌐ 1988-1989 by the Trustees of Dartmouth College }
  135. { Written by Kevin Calhoun }
  136.  
  137. { This source compatible with MPW Pascal 3.0 }
  138.  
  139. (*
  140. Pascal PictureShow.p
  141. Link -m ENTRYPOINT Γêé
  142.      -o "YourFile" Γêé
  143.      -rt XCMD=6464 Γêé
  144.      -sn Main=PictureShow Γêé
  145.      PictureShow.p.o Γêé
  146.     "{Libraries}"interface.o Γêé
  147.     "{PLibraries}"Paslib.o Γêé
  148.     "{Libraries}"HyperXLib.o
  149. *)
  150.  
  151. {$R-}
  152.  
  153. INTERFACE
  154.  
  155.   USES
  156.     Types,
  157.     Memory,
  158.     Windows,
  159.     Palettes,
  160.     OSEvents,
  161.     Desk,
  162.     Resources,
  163.     ToolUtils,
  164.     Packages,
  165.     HyperXCmd;
  166.     
  167.   TYPE Disposal = (onMouseDown, onMouseUp, letItLive);
  168.  
  169.   PROCEDURE EntryPoint (paramPtr : XCMDPtr);
  170.  
  171. IMPLEMENTATION
  172.  
  173.   PROCEDURE PopItUpAlready (paramPtr : XCMDPtr); FORWARD;
  174.  
  175.   PROCEDURE EntryPoint (paramPtr : XCMDPtr);
  176.   BEGIN
  177.     PopItUpAlready(paramPtr);
  178.   END;
  179.  
  180.   FUNCTION ColorQDExists : BOOLEAN;
  181.   { is Color QuickDraw present ? }
  182.   VAR
  183.     theWorld: SysEnvRec;
  184.     err: OSErr;
  185.  
  186.   BEGIN
  187.     err := SysEnvirons(1, theWorld);
  188.     ColorQDExists := theWorld.hascolorQD;
  189.   END;
  190.  
  191.   FUNCTION GetScreenBitsBounds: Rect;
  192.   { get screenbits.bounds from the QuickDraw globals }
  193.   TYPE
  194.     LongwordPtr = ^LONGINT;
  195.     BitMapPtr = ^BitMap;
  196.   CONST
  197.     screenBitsOffset = -122;
  198.     CurrentA5 = $904;
  199.   VAR
  200.     screenBitsPtr : BitMapPtr;
  201.     myLongwordPtr : LongwordPtr;
  202.   BEGIN
  203.     myLongwordPtr := LongwordPtr(CurrentA5);
  204.       { myLongwordPtr now points to the pointer to the first QD global }
  205.     myLongwordPtr := LongwordPtr(myLongwordPtr^);
  206.       { myLongwordPtr now points to the first QD global }
  207.     screenBitsPtr := BitMapPtr(myLongwordPtr^ + screenBitsOffset);
  208.       { screenBitsPtr now points to the screenBits BitMap }
  209.     GetScreenBitsBounds := screenBitsPtr^.bounds;
  210.   END;
  211.  
  212.   FUNCTION GetLocOfCardWindow (cardWindow : WindowPtr) : Point;
  213.     VAR
  214.       savePort : GrafPtr;
  215.       pt: Point;
  216.   BEGIN
  217.     GetPort(savePort);
  218.     SetPort(cardWindow);
  219.     SetPt(pt,0,0);
  220.     LocalToGlobal(pt);
  221.     SetPort(savePort);
  222.     GetLocOfCardWindow := pt;
  223.   END;
  224.   
  225.   PROCEDURE CenterRect(VAR r: Rect; inRect: Rect; doH, doV: BOOLEAN);
  226.     VAR
  227.       hSize, vSize: INTEGER;
  228.       hCoord, vCoord: INTEGER;
  229.   BEGIN
  230.     WITH r DO
  231.       BEGIN
  232.       hCoord := left;
  233.       vCoord := top;
  234.       hSize := right-left;
  235.       vSize := bottom-top;
  236.       END;
  237.     WITH inRect DO
  238.       BEGIN
  239.       IF doH THEN hCoord := (right-left - hSize) DIV 2 + left;
  240.       IF doV THEN vCoord := (bottom-top - vSize) DIV 2 + top;
  241.       END;
  242.     SetRect(r, hCoord, vCoord, hCoord+hSize, vCoord+vSize);
  243.   END;
  244.   
  245.   PROCEDURE CopyCTab(source: CTabHandle; VAR dest: CTabHandle);
  246.     VAR err: OSErr;
  247.   BEGIN
  248.     dest := NIL;
  249.     dest := source;
  250.     err := HandToHand(Handle(dest));
  251.   END;
  252.  
  253.   PROCEDURE PICT2CTab(srcBits: PixMap; srcRect: Rect; dstRect: Rect; mode: INTEGER;
  254.                          maskRgn: RgnHandle);
  255.     VAR
  256.       cTab: CTabHandle;
  257.   { Copy the last color table we find in a quickdraw picture. 
  258.     We'll use this as a temporary replacement for StdBits. 
  259.     We store any color table we copy in the refcon field of
  260.     the frontmost window, and we assume that anything we find
  261.     there is already a handle to a color table. }
  262.   BEGIN
  263.     if BitTst(@srcBits.rowBytes,0) THEN           { we've got a pixMap }
  264.       BEGIN
  265.       IF srcBits.pmTable <> NIL THEN
  266.         BEGIN
  267.         cTab := CTabHandle(GetWRefCon(FrontWindow));
  268.         IF cTab <> NIL THEN DisposCTable(cTab);
  269.         CopyCTab(srcBits.pmTable, cTab);
  270.         SetWRefCon(FrontWindow,LONGINT(cTab));
  271.         END;
  272.       END;
  273.   END;
  274.   
  275.   PROCEDURE GetPaletteFromPICT(picHndl: PicHandle; VAR pltt: PaletteHandle);
  276.  
  277.     { Set the QuickDraw bottleneck routine that handles bit copying to our
  278.       routine that copies the color table of a pixmap.  We get the handle
  279.       to the color table from the refcon field of the frontmost window,
  280.       which is our window at this point.
  281.       
  282.       All of this manipulation of the refcon field of the frontmost window
  283.       is fairly ugly, but it's an acceptable way to do this without using
  284.       global variables (if the frontmost window is a color window--in this
  285.       case we know it is, because we created it). }
  286.       
  287.     LABEL 99;
  288.     CONST
  289.       kExtremeNeg = -32768;
  290.       kExtremePos = 32767 - 1;
  291.     VAR
  292.       windPtr: WindowPtr;
  293.       cTab: CTabHandle;
  294.       entries: INTEGER;
  295.       saveRefCon: LONGINT;
  296.       hs: SignedByte;
  297.       procsStorage: Handle;
  298.       saveProcsPtr: QDProcsPtr;
  299.       cProcsPtr: CQDProcsPtr;
  300.       rct: Rect;
  301.       theMaxDevice: GDHandle;
  302.       
  303.   BEGIN
  304.     pltt := NIL;
  305.     windPtr := FrontWindow;
  306.     saveRefCon := GetWRefCon(windPtr);
  307.     SetWRefCon(windPtr,0);
  308.     
  309.     procsStorage := NewHandle(SIZEOF(CQDProcs));
  310.     IF MemError <> noErr THEN GOTO 99;
  311.  
  312.     MoveHHi(procsStorage);
  313.     HLock(procsStorage);
  314.     cProcsPtr := CQDProcsPtr(procsStorage^);
  315.  
  316.     saveProcsPtr := windPtr^.grafProcs;
  317.     SetStdCProcs(cProcsPtr^);
  318.     cProcsPtr^.bitsProc := @PICT2CTab;
  319.     windPtr^.grafProcs := QDProcsPtr(cProcsPtr);
  320.  
  321.     hs := HGetState(Handle(picHndl));
  322.     HLock(Handle(picHndl));
  323.     rct := picHndl^^.picFrame;
  324.     WITH rct DO SetRect(rct,16384,16384, 16384+(right-left),16384+(bottom-top));
  325.                             { make sure the drawing is done offscreen }
  326.     DrawPicture(picHndl, rct);
  327.     HSetState(Handle(picHndl),hs);
  328.     
  329.     windPtr^.grafProcs := saveProcsPtr;
  330.     DisposHandle(procsStorage);
  331.  
  332.     cTab := CTabHandle(GetWRefCon(FrontWindow));
  333.     IF cTab = NIL THEN
  334.       BEGIN
  335.         { we'll get the default color table for the deepest device }
  336.       SetRect(rct, kExtremeNeg, kExtremeNeg, kExtremePos, kExtremePos);
  337.       theMaxDevice := GetMaxDevice(rct);
  338.       cTab := GetCTable(theMaxDevice^^.gdPMap^^.pixelSize);
  339.       DetachResource(Handle(cTab));
  340.       END;
  341.     IF cTab <> NIL THEN
  342.       BEGIN
  343.         { now we'll make an "intolerant" palette for our window with these colors }
  344.       entries := cTab^^.ctSize + 1;
  345.       pltt := NewPalette(entries,cTab,pmTolerant,$0000);
  346.       DisposCTable(cTab);
  347.       END;
  348.     99: SetWRefCon(windPtr,saveRefCon);
  349.   END;
  350.  
  351.   PROCEDURE PopItUpAlready (paramPtr : XCMDPtr);
  352.     LABEL
  353.       98,99,100;
  354.     VAR
  355.       err: OSErr;
  356.       reserve: Handle;
  357.       cardPort : grafPtr;
  358.       picName: Str255;
  359.       str: Str255;
  360.       rTop : INTEGER;
  361.       rLeft : INTEGER;
  362.       windKind : INTEGER;
  363.       picHndl : PicHandle;
  364.       r : rect;
  365.       centerH,centerV: BOOLEAN;
  366.       wStorage : Handle;
  367.       color: BOOLEAN;
  368.       windPtr : WindowPtr;
  369.       pltt: PaletteHandle;
  370.       anEvent : EventRecord;
  371.       cardTopLeft : Point;
  372.       pictureByeBye : Disposal;
  373.       theMask : INTEGER;
  374.       passThru : BOOLEAN;
  375.  
  376.     PROCEDURE PassReturnValue (theMsg : Str255); { set theResult and quit }
  377.     BEGIN
  378.       paramPtr^.returnValue := PasToZero(paramPtr, theMsg);
  379.     END;
  380.  
  381.   BEGIN
  382.     IF paramPtr^.paramCount = 0 THEN
  383.       BEGIN
  384.       PassReturnValue('PictureShow XCMD 1.0.1, 17 June 1989, ┬⌐1988-1989 Dartmouth College');
  385.       GOTO 100;
  386.       END;
  387.  
  388.     reserve := NewHandle(33000);
  389.     err := MemError;
  390.     IF err <> noErr  THEN GOTO 100;
  391.     
  392.     GetPort(cardPort);
  393.  
  394.     ZeroToPas(paramPtr,paramPtr^.params[1]^,picName);
  395.     picHndl := PicHandle(GetNamedResource('PICT', picName));
  396.     IF picHndl = NIL THEN
  397.       BEGIN
  398.       err := ResError;
  399.       GOTO 99;
  400.       END;
  401.  
  402.     DetachResource(Handle(picHndl));
  403.     HNoPurge(Handle(picHndl));
  404.  
  405.     r := picHndl^^.picFrame;
  406.     windKind := 0;
  407.     pictureByeBye := letItLive;
  408.     passThru := FALSE;
  409.     centerH := TRUE;
  410.     centerV := TRUE;
  411.     
  412.     IF paramPtr^.paramCount > 2 THEN
  413.       BEGIN
  414.       ZeroToPas(paramPtr, paramPtr^.params[2]^, str);
  415.       rLeft := StrToNum(paramPtr, str);
  416.       centerH := (LENGTH(str) = 0);
  417.       ZeroToPas(paramPtr, paramPtr^.params[3]^, str);
  418.       rTop := StrToNum(paramPtr, str);
  419.       centerV := (LENGTH(str) = 0);
  420.       cardTopLeft := GetLocOfCardWindow(WindowPtr(cardPort));
  421.       WITH r, cardTopLeft DO OffsetRect(r,-left+rLeft + h,-top+rTop + v);
  422.       END
  423.     ELSE GOTO 98;
  424.     
  425.     IF paramPtr^.paramCount > 3 THEN
  426.       BEGIN
  427.       ZeroToPas(paramPtr, paramPtr^.params[4]^, str);
  428.       windKind := StrToNum(paramPtr, str);
  429.       END
  430.     ELSE GOTO 98;
  431.     
  432.     IF paramPtr^.paramCount > 4 THEN
  433.       BEGIN
  434.       ZeroToPas(paramPtr, paramPtr^.params[5]^, str);
  435.       IF (IUEqualString(str, 'TRUE') = 0) OR 
  436.       (IUEqualString(str, 'onRelease') = 0) THEN
  437.         pictureByeBye := onMouseUp
  438.       ELSE IF IUEqualString(str, 'onPress') = 0 THEN
  439.         pictureByeBye := onMouseDown
  440.       ELSE IF IUEqualString(str, 'stay') = 0 THEN
  441.         pictureByeBye := letItLive;
  442.       END
  443.     ELSE GOTO 98;
  444.     
  445.     IF paramPtr^.paramCount > 5 THEN
  446.       BEGIN
  447.       ZeroToPas(paramPtr, paramPtr^.params[6]^, str);
  448.       passThru := StrToBool(paramPtr, str);
  449.       END;
  450.  
  451.     98: wStorage := NewHandle(SIZEOF(WindowRecord));
  452.     err := MemError;
  453.     IF err <> noErr THEN
  454.       BEGIN
  455.       DisposHandle(Handle(picHndl));
  456.       GOTO 98;
  457.       END;
  458.       
  459.     MoveHHi(wStorage);
  460.     HLock(wStorage);
  461.     
  462.     InitCursor;
  463.     CenterRect(r,GetScreenBitsBounds,centerH,centerV);
  464.     color := ColorQDExists;
  465.     IF color THEN
  466.       windPtr := NewCWindow(wStorage^, r, picName, TRUE, windKind, POINTER(-1), FALSE, 0)
  467.     ELSE
  468.       windPtr := NewWindow(wStorage^, r, picName, TRUE, windKind, POINTER(-1), FALSE, 0);
  469.     IF windPtr = NIL THEN
  470.       BEGIN
  471.       DisposHandle(wStorage);
  472.       DisposHandle(Handle(picHndl));
  473.       err := -108;  {memFullErr}
  474.       GOTO 98;
  475.       END;
  476.       
  477.     SetPort(windPtr);
  478.     ClipRect(windPtr^.PortRect);      {make sure clip region is not empty.  See Mac Tech Note #59.}
  479.  
  480. {draw the pic into that window}
  481.     pltt := NIL;
  482.     IF color THEN
  483.       BEGIN
  484.       GetPaletteFromPICT(picHndl, pltt);
  485.       IF pltt <> NIL THEN
  486.         BEGIN
  487.         SetPalette(windPtr, pltt, TRUE);
  488.         ActivatePalette(windPtr);
  489.         END;
  490.       END;
  491.       
  492.     MoveHHi(Handle(picHndl));
  493.     HLock(handle(picHndl));
  494.     DrawPicture(picHndl, windPtr^.PortRect);    {draw picture, filling the window}
  495.  
  496.     SetOrigin(picHndl^^.picFrame.left,picHndl^^.picFrame.top);
  497.     SetWindowPic(windPtr, picHndl);
  498.     HUnlock(Handle(picHndl));
  499.  
  500.     If pictureByeBye = letItLive THEN
  501.       BEGIN
  502.       SetWRefCon(windPtr, 51459);  { we'll stick this here
  503.                                so we can identify this window as ours }
  504.       WindowPeek(windPtr)^.windowKind := 514;
  505.                              { and we'll put this here just for extra safety }
  506.       END
  507.     ELSE
  508.       BEGIN
  509.       { wait for mouse-down or mouse-up }
  510.       IF pictureByeBye = onMouseUp THEN theMask := mupmask
  511.       ELSE theMask := mdownMask;
  512.       REPEAT SystemTask;
  513.       UNTIL OSEventAvail(theMask, anEvent);
  514.       IF NOT passThru THEN IF GetNextEvent(theMask, anEvent) THEN ;
  515.               {get rid of window and pict; restore port, and exit}
  516.       CloseWindow(windPtr);
  517.       IF pltt <> NIL THEN DisposePalette(pltt);
  518.       DisposHandle(wStorage);
  519.       SetPort(cardPort);
  520.       SendCardMessage(paramPtr, 'go to this card');
  521.       END;
  522.  
  523.     99: DisposHandle(reserve);
  524.     
  525.     100: IF err <> noErr THEN
  526.       BEGIN
  527.       NumToString(err,str);
  528.       PassReturnValue(CONCAT('Error ',str));
  529.       END;
  530.   END;
  531.  
  532. END.